- /* sxcbgpi.cpp by K.Tsuru */
- // function ID 5103 BRADIX
- /**********************
- SDecimal class
- pi by Gauss's formura
- ***********************/
- #ifndef SN_H
- #include "sn.h"
- #endif
-
- SDecimal BGaussPi(){
- SDecimal pi, y;
-
- XsMult(Batan2(1,18),48,pi); // 48*atan(1/18)
- XsMult(Batan2(1,57),32,y); // y = 32*atan(1/57)
- XXAdd(pi, y, pi);
- XsMult(Batan2(1, 239),20, y); // y = 20*atan(1/239)
- XXSub(pi, y, pi);
-
- return pi;
- }
- // function ID 3504 DRADIX
- SDouble GaussPi(){
- return BGaussPi().ConvToDec();
- }
sxcbgpi.cpp : last modifiled at 2016/09/04 14:21:44(540 bytes)
created at 2015/12/22 16:09:56
The creation time of this html file is 2017/10/27 15:45:59 (Fri Oct 27 15:45:59 2017).